# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks-old
maintainer="team/kde <bribbers@disroot.org>"
pkgname=kross
pkgver=5.116.0
pkgrel=0
pkgdesc="Framework for scripting KDE applications"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later"
depends_dev="
	kcompletion5-dev
	kcoreaddons5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	kparts5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	kdoctools5-dev
	samurai
	"
_repo_url="https://invent.kde.org/frameworks/kross.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/kross-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
cc6b3e4da7c5ccdbcbe7917405f84930ab89a9d82999ccc7016affa5dbdd540e3da7f5a45bfdc753c5160fefc506cdda9717e424dc33cba7f97ea8323e53564b  kross-5.116.0.tar.xz
"
